package com.deer.wms.base.system.model.box;


import com.deer.wms.common.annotation.Excel;
import com.deer.wms.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import javax.persistence.*;

/**
 * 组盘表 box_item
 *
 * @author guo
 * @date 2019-06-03
 */
@Table(name = "box_item_error")
public class BoxItemError extends BaseEntity
{

	/**  */
	@Id
	@Column(name = "errorId",insertable = false)
    @GeneratedValue(strategy = GenerationType.IDENTITY,generator = "JDBC")
	private Integer errorId;

	private Long id;
	/** 托盘条码 */
	@Excel(name = "托盘号")
	private String boxCode;
	/** 物料编码 */
	@Excel(name = "物料编码")
	private String itemCode;
	/** 批次 */
	@Excel(name = "批次")
	private String batch;
	/**  */
	@Excel(name = "数量")
	private Integer quantity;
	/**
	 * 是否是Mes工单备料
	 * 0-否，1-是
	 * */
	@Column(name="work_order_stock_state")
	private Integer workOrderStockState;
	/** 入库单行ID */
	@Column(name = "bill_in_detail_id")
	private Integer billInDetailId;

	//详细请参考TaskTypeConstant
	@Column(name="sub_inventory_id")
	private Integer subInventoryId;
	/**
	 * 仓库iD
	 */
	@Column(name="ware_id")
	private Integer wareId;

	@Column(name="forecast_stock_quantity")
	private Integer forecastStockQuantity;

	@Excel(name = "生产日期")
	@Column(name = "pd")
	private String pd;
	@Column(name = "exp")
	@Excel(name = "有效期至")
	private String exp;
	@Excel(name = "入库时间")
	@Column(name = "in_time")
	private String inTime;
	private  String startTime;//创建时间
	private  String endTime;//结束时间
	@Column(name = "state")
	@Excel(name = "状态", readConverterExp = "0=正常,1=冻结")
	private Integer state;//0-正常 1-冻结

	@Column(name = "stow_create_time")
	private String stowCreateTime;//入库时，托盘码垛的时间

	@Column(name = "pid")
	private Integer pid;
	/** 创建人员 */
	@Column(name = "create_user_name")
	@Excel(name = "操作人员")
	private String createUserName;

	@Column(name = "create_user_id")
	private Integer createUserId;
	private String planName;
	@Column(name = "delect_time")
	private String delectTime;

	private String itemName;

	private String memo;

	private String areaStartTime;
	private String areaEndTime;

	private Integer itemId;

	public Integer getItemId() {
		return itemId;
	}

	public void setItemId(Integer itemId) {
		this.itemId = itemId;
	}

	public String getAreaStartTime() {
		return areaStartTime;
	}

	public void setAreaStartTime(String areaStartTime) {
		this.areaStartTime = areaStartTime;
	}

	public String getAreaEndTime() {
		return areaEndTime;
	}

	public void setAreaEndTime(String areaEndTime) {
		this.areaEndTime = areaEndTime;
	}

	public String getItemName() {
		return itemName;
	}

	public void setItemName(String itemName) {
		this.itemName = itemName;
	}

	public String getMemo() {
		return memo;
	}

	public void setMemo(String memo) {
		this.memo = memo;
	}

	public String getDelectTime() {
		return delectTime;
	}

	public void setDelectTime(String delectTime) {
		this.delectTime = delectTime;
	}

	public String getPlanName() {
		return planName;
	}

	public void setPlanName(String planName) {
		this.planName = planName;
	}

	public String getCreateUserName() {
		return createUserName;
	}

	public void setCreateUserName(String createUserName) {
		this.createUserName = createUserName;
	}

	public Integer getCreateUserId() {
		return createUserId;
	}

	public void setCreateUserId(Integer createUserId) {
		this.createUserId = createUserId;
	}

	public Integer getPid() {
		return pid;
	}

	public void setPid(Integer pid) {
		this.pid = pid;
	}

	public String getStowCreateTime() {
		return stowCreateTime;
	}

	public void setStowCreateTime(String stowCreateTime) {
		this.stowCreateTime = stowCreateTime;
	}

	public Integer getState() {
		return state;
	}

	public void setState(Integer state) {
		this.state = state;
	}

	public String getStartTime() {
		return startTime;
	}

	public void setStartTime(String startTime) {
		this.startTime = startTime;
	}

	public String getEndTime() {
		return endTime;
	}

	public void setEndTime(String endTime) {
		this.endTime = endTime;
	}

	public Integer getWareId() {
		return wareId;
	}

	public void setWareId(Integer wareId) {
		this.wareId = wareId;
	}

	public String getPd() {
		return pd;
	}

	public void setPd(String pd) {
		this.pd = pd;
	}

	public String getExp() {
		return exp;
	}

	public void setExp(String exp) {
		this.exp = exp;
	}

	public Integer getForecastStockQuantity() {
		return forecastStockQuantity;
	}

	public void setForecastStockQuantity(Integer forecastStockQuantity) {
		this.forecastStockQuantity = forecastStockQuantity;
	}

	public void setBoxCode(String boxCode) {
		this.boxCode = boxCode;
	}

	public void setId(Long id)
	{
		this.id = id;
	}

	public Long getId()
	{
		return id;
	}
	public void setBoxNo(String boxCode)
	{
		this.boxCode = boxCode;
	}

	public String getBoxCode()
	{
		return boxCode;
	}
	public void setItemCode(String itemCode)
	{
		this.itemCode = itemCode;
	}

	public String getItemCode()
	{
		return itemCode;
	}
	public void setBatch(String batch)
	{
		this.batch = batch;
	}

	public String getBatch()
	{
		return batch;
	}
	public void setQuantity(Integer quantity)
	{
		this.quantity = quantity;
	}

	public Integer getQuantity()
	{
		return quantity;
	}

	public void setBillInDetailId(Integer billInDetailId)
	{
		this.billInDetailId = billInDetailId;
	}

	public Integer getBillInDetailId()
	{
		return billInDetailId;
	}

	public Integer getSubInventoryId() {
		return subInventoryId;
	}

	public void setSubInventoryId(Integer subInventoryId) {
		this.subInventoryId = subInventoryId;
	}

	public Integer getWorkOrderStockState() {
		return workOrderStockState;
	}

	public void setWorkOrderStockState(Integer workOrderStockState) {
		this.workOrderStockState = workOrderStockState;
	}

	public String getInTime() {
		return inTime;
	}

	public void setInTime(String inTime) {
		this.inTime = inTime;
	}

	public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("boxNo", getBoxCode())
            .append("itemCode", getItemCode())
            .append("batch", getBatch())
            .append("quantity", getQuantity())
            .append("workOrderStockState", getWorkOrderStockState())
            .append("billInDetailId", getBillInDetailId())
            .append("subInventoryId", getSubInventoryId())
			.append("pd",getPd())
			.append("exp",getExp())
			.append("inTime",getInTime())
            .toString();
    }

	public BoxItemError() {
	}

	public BoxItemError(String boxCode, String itemCode, String batch, Integer quantity, Integer billInDetailId, Integer subInventoryId) {
		this.boxCode = boxCode;
		this.itemCode = itemCode;
		this.batch = batch;
		this.quantity = quantity;
		this.billInDetailId = billInDetailId;
		this.subInventoryId = subInventoryId;
	}
}
